<?php if(!defined('HOST'))die('not access');//caozuo?>
<script >
var c;
$(document).ready(function(){
	{params};
	var atype=params.atype;
	c = {
		delss:function(){
			a.del({url:js.getajaxurl('dellog','{mode}','{dir}'),checked:true});
		},
		daochu:function(){
			a.exceldown();
		},
		mergeProject:function(){
			var v = a.getchecked();
			if (v == "") {
				alert("请选择要合并的项目");
				return ;
			}
			var projectname = $("#projectname_{rand}").val();
			js.ajax(js.getajaxurl('mergeProject','{mode}','{dir}'),{ids:v, projectname:projectname},function(s){
				alert(s.msg);
			},'get,json',false,'');
		}
	};
	js.initbtn(c);
});
</script>

<div>


<table width="100%"><tr>
	<td>
		<select class="form-control" id="project_{rand}">
			
		</select>
	</td>
	<td style="padding-right:10px;" id="tdleft_{rand}" nowrap>
		<button id="addbtn_{rand}" class="btn btn-primary" click="clickwin,0" type="button">导出</button>
	</td>
	<td nowrap style="padding-left:10px">
		<!-- 
		<button class="btn btn-default" click="search" type="button">搜索</button>&nbsp; 
		 -->
	</td>
	

</tr>
</table>
</div>
<div class="blank10"></div>
<div id="veiw_{rand}"></div>
<script>
$(document).ready(function(){
	function loadProjectlist(){
		js.ajax(js.getajaxurl('getNowYearProject','index','cg'), 
			{
			
			},function(s){
				var ccc ="<option value=''>--请选择--</option>";
				$.each(s, function(i, field){
					ccc += "<option value='"+field.id+"'>"+field.name+"</option>";
				});
				$("#project_{rand}").html(ccc);
		},'get,json',false,'');
	}
	loadProjectlist();
});
</script>